﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using DAL.Service.admin;
using DAL.Service.admin.Impl;

namespace BIZ
{
    /// <summary>
    /// 角色操作类
    /// </summary>
    public class RoleOper
    {
        static IRoleService roleService = new RoleServiceImpl();


        public IList getRoleList()
        {
            return roleService.getRoleList();
        }

        public object save(object entity)
        {
            return roleService.save(entity);
        }


        public int deleteRole(string ids)
        {
            return roleService.deleteRole(ids);
        }

        public IList getRolebyid(int id)
        {
            return roleService.getRolebyid(id);
        }


        public IList getRoleList(int pageno, int pagesize)
        {
            return roleService.getRoleList(pageno, pagesize);
        }


        public bool getCountByName(string name, int id)
        {
            return roleService.getCountByName(name, id) > 0 ? true : false;
        }
    }
}
